package com.indusfo.spc.pojo;

import com.indusfo.spc.common.pojo.BasePojo;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 托盘实体类
 * 
 * @author chenm
 * @date 2019/07/06 15:56
 *
 */
@Getter
@Setter
@Table(name = "T_B71_PALLETS")
public class Pallets extends BasePojo {

	private static final long serialVersionUID = 1;

	@Id
	@Column(name = "PAL_ID", insertable = false)
	private Integer palId; // 托盘id

	private String palCode;// 托盘编号

	private String palName;// 托盘名称

	private String moderno;// 生产任务单号

	private String batchno;// 批号

	private String remark;// 备注

	//1启用，2停用，3，删除
	private Integer dataState = 1;// 状态

	private String dataStateName ;// 状态名称

	public String getDataStateName() {
		Integer dataState = getDataState();
		String lDataStateName ="";
		switch (dataState){
			case 1:
				lDataStateName = "启用";
				break;
			case 2:
				lDataStateName = "删除";
				break;
			case 3:
				lDataStateName = "停用";
				break;
		}
		return lDataStateName;
	}

	public Pallets() {
	}

	public Pallets(String palCode, String palName, String moderno, String batchno) {
		this.palCode = palCode;
		this.palName = palName;
		this.moderno = moderno;
		this.batchno = batchno;
	}
}
